package com.tecode.java.bank01;

public class Account {

	
	//定义一个属性
	private double balance;
	
	//构造器。
	public 	Account(double init_balance){
		this.balance = init_balance;
	}
	
	/**
	 * 返回账号的余额
	 * @return
	 */
	public double getBalance() {
		return balance;
	}
	/**
	 * 存钱方法
	 */
	
	public  void  deposit(double amt){		
		balance += amt;
	}
	
	/**
	 * 取钱方法
	 */
	
	public void withdraw(double amt){
		balance -=amt;
	}
}
